export default {
    type: 'nav',
    name: 'system-nav',
    style:{
      'margin-top': '1px'
    },
    stacked: true,
    source: {
      url: '/upms/admin/system/select',
      adaptor: function (payload, response, api, context) {
        let value = '';
        if(payload.data && payload.data.length > 0){
          for(let i = 0; i < payload.data.length; i++){
            payload.data[i].to = '?systemId=' + payload.data[i].value;
            if(i === 0){
              value = payload.data[i].to;
            }
          }
        }
        payload.data = {
          links: payload.data,
          value
        };
        return {
            ...payload
        };
      }
    }
}